﻿using System;
using System.Windows.Input;

namespace AnthStat.WPF.Applications
{
    public sealed class SettingsPanelViewModel : ViewModelBase
    {
        private bool _isShowingSettingsPanel = false;

        public SettingsPanelViewModel()
            : base()
        {

        }

        public bool IsShowingSettingsPanel
        {
            get
            {
                return _isShowingSettingsPanel;
            }
            set
            {
                if (_isShowingSettingsPanel != value)
                {
                    _isShowingSettingsPanel = value;
                    RaisePropertyChanged("IsShowingSettingsPanel");
                }
            }
        }

        public ICommand ToggleShowSettingsCommand { get { return new RelayCommand(ToggleShowSettingsCommandExecute, CanExecuteToggleShowSettingsCommand); } }
        private void ToggleShowSettingsCommandExecute()
        {
            IsShowingSettingsPanel = !IsShowingSettingsPanel;
        }

        private bool CanExecuteToggleShowSettingsCommand()
        {
            return true;
        }
    }
}
